﻿using MRSite.Cache;
using MRSite.Cache.Configuration;
using MRSite.Common.Dependency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MRSite.RedisCache
{
    public class ShanYuRedisCacheManager : BaseCacheManager
    {
        public ShanYuRedisCacheManager(IContainerManager containerManager,
            ICacheConfiguration cacheConfiguration)
            : base(cacheConfiguration)
        {
            _ctnManager = containerManager;
        }

        protected override ICache CreateCacheImplement(string cacheName)
        {
            return _ctnManager.Resolver<ShanYuRedisCache>(new { name = cacheName });
        }
        private IContainerManager _ctnManager;
    }
}
